<template>
	<view>
		<view class="search-cont">
			<view class="search">
				<input type="text" placeholder-class="inputclass" confirm-type="search" placeholder="请输入关键字"
					@confirm="seArch" v-model="keyword" @input="setStorage" />
			</view>
			<view class="search-code" @click="seArch()">搜索</view>
		</view>
		<!-- 搜索历史 -->
		<view class="search-history" v-if="keyword =='' "> 
			<view class="search-title">
				<view>热门搜索</view>
				<view @click="removeStorage()">
				</view>
			</view>
			<!-- tab -->
			<view class="menu-block">
				<block v-for="(item,index) in 3" :key="index">
					<view @click="menubtn(item.name)">大配件</view>
				</block>
			</view>
		</view>
		<view class="flex flex-wrap rowsb padding ">

			<view class="scroll_shop_right margin-bottom " v-for="(item,index) in 0" :key='item.id'
				@click="commodityDetail(item) ">
				<image :src="item.img" mode="aspectFill" style="height: 290rpx;" class="bg-gray"></image>
				<view class="onelineshow text-bold text-black" :style="[{'font-size':'32rpx'}]">
					{{item.title}}
				</view>
				<view>
					{{item.scan_address}}
				</view>
				<view class="rowsb padding-right-xs">
					<text>
						￥<text>{{item.price}}元/株</text>
					</text>
					<text class="text-xs text-gray">
						{{item.page_view}}人查看
					</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword:''
			}
		},
		onShow() {
		},
		


	}
</script>

<style scoped>
	.search {
		height: 70upx;
		line-height: 70upx;
		width: 100%;
		display: flex;
		flex-direction: row;
		background: #f8f8f8;
		border-top-left-radius: 50upx;
		border-bottom-left-radius: 50upx;
		border-bottom-right-radius: 50upx;
		margin-left: 20upx;
	}

	.search input {
		height: 70upx;
		line-height: 70upx;
		width: 100%;
		font-size: 30upx;
		color: #666666;
		padding-left: 30upx;
	}

	.search-cont {
		display: flex;
		justify-content: space-between;
		height: 70upx;
		align-items: center;
		padding: 30upx 0;
	}

	.search-code {
		margin-left: 30rpx;
		margin-right: 30rpx;
		width: 150upx;
		height: 60upx;
		text-align: center;
		font-size: 30upx;
		color: white;
		border-radius: 999rpx;
		line-height: 60rpx;
		background-color: #19C175;
	}

	/* 搜索历史 */
	.search-history {
		margin: 20upx;
	}

	.search-title {
		font-size: 30upx;
		font-weight: bold;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 60upx;
		line-height: 60upx;
	}

	.search-title image {
		width: 36upx;
		height: 36upx;
		display: block;
	}

	.menu-block view {
		background: #f7f8fa;
		border-radius: 99upx;
		font-size: 27upx;
		color: #292c33;
		text-align: center;
		padding: 10upx 30rpx;
		margin: 30upx 30upx 0 0;
	}

	.menu-block {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.newing {
		padding-bottom: 30upx;
	}


	/* 商品列表 */
	.scroll_shop_right {
		width: 336rpx;
		height: 453rpx;
		box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.14);
		opacity: 1;
		border-radius: 20rpx;
		overflow: hidden;
	}
</style>
